package com.zhuhjay.controller;

import com.zhuhjay.model.domain.HttpResult;
import com.zhuhjay.model.entity.Type;
import com.zhuhjay.service.TypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ZhuHJay
 * @date 2023/4/26 16:28
 */
@RestController
@RequestMapping("/type")
public class TypeController {

    @Resource
    private TypeService typeService;

    @GetMapping("list.auth")
    public HttpResult<List<Type>> list() {
        return HttpResult.ok(typeService.list());
    }

}
